import 'package:flutter/material.dart';
import '../widget/never_over_scroll_indicator.dart';

class NavigatorUtils{

  static Future<T?> showTTDialog<T>({
        required BuildContext context,
        bool barrierDismissible = true,
        WidgetBuilder? builder}){
    return showDialog(context: context,
      barrierDismissible:  barrierDismissible,
    builder: (context){
      return MediaQuery(data: MediaQueryData.fromView(WidgetsBinding.instance.platformDispatcher.views.first),
          child: NeverOverScrollIndicator(
            needOverload: false,
            widget: SafeArea(child: builder!(context)),
          ));
    });

  }
}